import { Descriptions } from 'antd'
import { useRecoilValue } from 'recoil'
import style from './style.module.less'
import IconSvg from '@/components/IconSvg'
import { userInfo } from '@/store/userInfo'

export default () => {
  const userinfo = useRecoilValue(userInfo)

  return (
    <div className={style.examineBox}>
      <div className={style.center}>
        <div className={style.top}>医院管理员信息</div>
        <div className={style.bottom}>
          <div className={style.bottomCenter}>
            <Descriptions column={1} bordered={false} className={style.description}>
              <Descriptions.Item label='用户角色'>医院用户</Descriptions.Item>
              <Descriptions.Item label='用户医院'>{userinfo.hospitalName}</Descriptions.Item>
              <Descriptions.Item label='医院编码'>{userinfo.hospitalCode}</Descriptions.Item>
              <Descriptions.Item label='医院所属地区'>{userinfo.provinceName}</Descriptions.Item>
              <Descriptions.Item label='医院城市'>{userinfo.cityName}</Descriptions.Item>
              <Descriptions.Item label='绑定邮箱'>{userinfo.email}</Descriptions.Item>
              <Descriptions.Item label='联系电话'>{userinfo.phone}</Descriptions.Item>
              <Descriptions.Item label='姓名'>{userinfo.username}</Descriptions.Item>
              <Descriptions.Item label='账号密码'>********</Descriptions.Item>
              <Descriptions.Item label='登录次数'>{userinfo.loginTimes}</Descriptions.Item>
              <Descriptions.Item label='上一次登录时间'>{userinfo.lastLoginDate}</Descriptions.Item>
            </Descriptions>
          </div>
        </div>
        <div className={style.imageBox}>
          <IconSvg name='examineImage' style={{ width: '100%', height: '100%' }} />
        </div>
      </div>
    </div>
  )
}
